﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Security.Principal;

namespace Wicresoft.UnifyShow.Portal
{
    public class CustomPrincipal : IPrincipal
    {
        private CustomIdentity identity;

        public CustomPrincipal()
        {
 
        }

        public CustomPrincipal(string cn, string uid, string dept, DateTime? loginTime, string authenticateType)
        {
            identity = new CustomIdentity(cn, uid, dept, loginTime, authenticateType);
        }

        #region IPrincipal

        public IIdentity Identity
        {
            get { return identity; }
        }

        public bool IsInRole(string role)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}